﻿using lazada.Models;
using System;
using System.Collections.Generic;
using System.Data.SqlClient;
using System.Linq;
using System.Web;

namespace lazada.DAL
{
    public class ImageFloorDAL:ConnectionDB
    {
        public ImageFloorDAL(): base()
        {

        }

        public List<ImageModel> THUONGHIEUimage()
        {
            List<ImageModel> list = new List<ImageModel>();
            SqlCommand command = new SqlCommand();
            command.CommandText = "select * from THUONGHIEUimage";
            command.Connection = Connection;
            SqlDataReader dr;
            dr = command.ExecuteReader();
            while(dr.Read())
            {
                ImageModel img = new ImageModel();

                img.image = dr["ImagePath"].ToString();
                list.Add(img);
            }
            Connection.Close();
            return list;
        }
       
    }
}